# import statements, set ibis system properties

ibisprops = StaticProperties()
# ...populate ibisprops

portprops = StaticProperties()
# ...populate portprops

ibis = Ibis.createIbis(ibisprops, None)
porttype = ibis.createPortType("porttypename",
                               portprops)
rank = PoolInfo.createPoolInfo().rank()

# create a receive port 
recvport = porttype.createReceivePort("recvportname")
recvport.enableConnections()

# create a send port...
sendport = porttype.createSendPort()
# and connect it to a receive port
registry = ibis.registry()
recvportID = registry.lookupReceivePort(
    "recvportvname")
sendport.connect(recvportID)

# send data
message = sendport.newMessage()
message.writeArray(data)
message.finish()

# receive data
message = recvport.receive()
message.readArray(data)
message.finish()
